import Vue from 'vue'
import Router from 'vue-router'


import index from '@/components/live/Index.vue'
import userdetail from '@/components/user/user-detail.vue'
import user from '@/components/user/user.vue'
import userinfo from '@/components/user/userinfo.vue'
import pay from '@/components/user/pay.vue'
import live from '@/components/live/Index.vue'
import login from '@/components/login.vue'
import course from '@/components/course/course_detail.vue'
import courseSearch from '@/components/search/course_search.vue'
import confirm from '@/components/sys/couser_pay.vue'
import shopCard from '@/components/sys/shop_card.vue'
import orderinfo from '@/components/order/orderinfo.vue'
import video from '@/components/vide.vue'
import learningVideo from '@/components/video/learning_video.vue'
import collect from '@/components/user/collect.vue'
import userorder from '@/components/user/userorder.vue'
import paySuccess from '@/components/sys/paySuccess.vue'
Vue.use(Router)

export default new Router({
  routes: [
    { path: '/',
      component: index,
     },
    {
      path:'/user/user-detail',
      component:userdetail,
      children:[
        {
          path:'/userinfo',
          name:'我的资料',
          component:userinfo
        },{
          path:'/collect',
          name:'collect',
          component:collect
        },{
          path:'/userorder',
          name:'userorder',
          component:userorder
        }
      ]
    },
    {
      path:'/pay',
      name:'支付',
      component:pay
    },{
      path:'/live',
      name:'live',
      component:live

    },{
      path:'/login',
      name:'login',
      component:login
    },{
      path:'/course/:id',
      name:'course',
      component:course
    },{
      path:'/courseSearch/:keyword',
      name:'search',
      component:courseSearch
    }
    ,{
      path:'/shopCard',
      name:'shopCard',
      component:shopCard
    },{
      path:'/confirm',
      name:'confirm',
      component:confirm
    },{
      path:'/orderinfo',
      name:'orderinfo',
      component:orderinfo
    },{
    path:'/video',
      name:'video',
      component:video
    },{
      path:'/learningVideo',
      name:'learningVideo',
      component:learningVideo
    },{
      path:'/paySuccess',
      name:'paySuccess',
      component:paySuccess
    }
  ]
})
